#pragma once
#include "entitybody.h"
#include "UltimatePhysicsActor.h"
#include "UltimatePhysicsActorDesc.h"
#include "UltimatePhysicsScene.h"

class PhysicsEntityBody :
	public EntityBody
{

	UltimatePhysicsActor* actor;
	UltimatePhysicsScene* physXScene;
	Ogre::String * entityName;
	Ogre::SceneNode *parentNode;


public:

	void setPosition(Ogre::Vector3 position);
	Ogre::Vector3 getPosition();

	void setOrientation(Ogre::Quaternion orientation);
	Ogre::Quaternion getOrientation();

	void setLookAt(Ogre::Vector3 target);
	Ogre::Vector3 getFacingDir();

	void setLocalPosition(Ogre::Vector3 position);
	Ogre::Vector3 getLocalPosition();

	void setLocalOrientation(Ogre::Quaternion orientation);
	Ogre::Quaternion getLocalOrientation();


	void addForce(Ogre::Vector3 force);
	void addTorque(Ogre::Vector3 torque);

	Ogre::SceneNode* getParentNode();

	void setEntityNameForUserData(Ogre::String *name);
	void disableGravity();

	virtual void killBody();

	PhysicsEntityBody(UltimatePhysicsActorDesc *actorDesc, UltimatePhysicsScene* scene,Ogre::SceneNode *node, bool isKinematic, bool isStatic, int collisionGroup, int weight=1);
	virtual ~PhysicsEntityBody(void);

};

